package com.starmark.sys.org.atomic.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starmark.core.framework.base.BaseUpdateModel;
import com.starmark.core.framework.base.IUniqueModel;
import com.starmark.core.framework.support.typehandler.AESEncryptHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 用户管理
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName(autoResultMap = true)
public class SysOrgUser extends BaseUpdateModel implements IUniqueModel {


    /**
     * 登陆帐户
     */
    private String loginName;
    /**
     * 密码
     */
    @TableField(typeHandler = AESEncryptHandler.class)
    private String password;

    /**
     * 姓名
     */
    private String name;
    /**
     * 姓名拼音
     */
    private String namePinyin;
    /**
     * 性别(0:未知;1:男;2:女)
     */
    private Integer sex;

    /**
     * 电话
     */
    private String mobile;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 身份证号码
     */
    private String idCard;

    /**
     * 出生日期
     */
    private Date birthDay;

   

    /**
     * 详细地址
     */
    private String address;
    /**
     * 工号
     */
    private String personNo;

    /**
     * 人员状态
     */

    private Boolean status;


    /**
     * 是否删除
     */

    @TableLogic
    private Boolean remove=false;

    @Override
    public String uniqueCode() {
        return this.getLoginName();
    }
}